package com.robcity.platform.convert;

import com.robcity.platform.dto.RobotLocationInfoSaveDTO;
import com.robcity.platform.entities.RobotLocationInfo;

/**
 * @Description
 * @Author zhangsong
 * @Date 2024/8/9
 **/
public class RobotLocationInfoConvert {
    public static RobotLocationInfo SaveDTO2RobotLocationInfo(RobotLocationInfoSaveDTO robotLocationInfoSaveDTO) {

        RobotLocationInfo robotLocationInfo = new RobotLocationInfo();
        robotLocationInfo.setRobId(robotLocationInfoSaveDTO.getRob_id());
        robotLocationInfo.setLat(robotLocationInfoSaveDTO.getLat());
        robotLocationInfo.setLon(robotLocationInfoSaveDTO.getLon());
        robotLocationInfo.setAlt(robotLocationInfoSaveDTO.getAlt());
        robotLocationInfo.setTimeStemp(robotLocationInfoSaveDTO.getTimeStemp());
        robotLocationInfo.setPower(robotLocationInfoSaveDTO.getBatLife());
        robotLocationInfo.setWorkStatus(robotLocationInfoSaveDTO.getWorkStatus());
        robotLocationInfo.setCurrentCommand(robotLocationInfoSaveDTO.getCurCmd());
        robotLocationInfo.setTaskType(robotLocationInfoSaveDTO.getTaskType());
        robotLocationInfo.setTaskId(robotLocationInfoSaveDTO.getTaskId());
        robotLocationInfo.setGropId(robotLocationInfoSaveDTO.getGrop_id());
        robotLocationInfo.setIncFlag(robotLocationInfoSaveDTO.getIncFlag());
        robotLocationInfo.setIncFlagUav(robotLocationInfoSaveDTO.getIncFlagUAV());
        robotLocationInfo.setIndax(robotLocationInfoSaveDTO.getIndex());
        return robotLocationInfo;

    }
}
